package com.readword.entity;

import java.util.ArrayList;
import java.util.List;

/**
* @ClassName: Examination
* @Description: 试题实体
* @author 码农小鹿
* @date 2024年1月10日 下午1:43:33
*
 */
public class Examination {

	// 题目
	private List<TextOrImg> topics;

	// 选项
	private List<String> options;

	// 答案
	private String answer;

	// 解析
	private String analysis;

	// 考点
	private String examSite;

	// 来源
	private String Source;

	// 易错项
	private String errorProne;

	// 图片（这个是结尾的图片，不掺合在题目内容中的图片）
	private List<String> imgs;
	
	// 子项
	private List<Examination> items;

	public List<TextOrImg> getTopics() {
		return topics;
	}

	public Examination setTopics(List<TextOrImg> topics) {
		this.topics = topics;
		return this;
	}

	public List<String> getOptions() {
		return options;
	}

	public Examination setOptions(List<String> options) {
		this.options = options;
		return this;
	}

	public String getAnswer() {
		return answer;
	}

	public Examination setAnswer(String answer) {
		this.answer = answer;
		return this;
	}

	public String getAnalysis() {
		return analysis;
	}

	public Examination setAnalysis(String analysis) {
		this.analysis = analysis;
		return this;
	}

	public String getExamSite() {
		return examSite;
	}

	public Examination setExamSite(String examSite) {
		this.examSite = examSite;
		return this;
	}

	public String getSource() {
		return Source;
	}

	public Examination setSource(String source) {
		Source = source;
		return this;
	}

	public String getErrorProne() {
		return errorProne;
	}

	public Examination setErrorProne(String errorProne) {
		this.errorProne = errorProne;
		return this;
	}

	public List<String> getImgs() {
		return imgs;
	}
	
	public Examination setImgs(List<String> imgs) {
		this.imgs = imgs;
		return this;
	}

	public List<Examination> getItems() {
		return items;
	}

	public Examination setItems(List<Examination> items) {
		this.items = items;
		return this;
	}

	public Examination addImg(String img) {
		if(null == this.imgs) {
			this.imgs = new ArrayList<String>();
		}
		if(null != img) {
			this.imgs.add(img);
		}
		return this;
	}

	public Examination addOption(String option) {
		if(null == this.options) {
			this.options = new ArrayList<String>();
		}
		if(null != option) {
			this.options.add(option);
		}
		return this;
	}

	public Examination addItem(Examination item) {
		if(null == this.items) {
			this.items = new ArrayList<Examination>();
		}
		if(null != item) {
			this.items.add(item);
		}
		return this;
	}

	public Examination addTopic(TextOrImg topic) {
		if(null == this.topics) {
			this.topics = new ArrayList<TextOrImg>();
		}
		if(null != topic) {
			this.topics.add(topic);
		}
		return this;
	}
	
	
	@Override
	public String toString() {
		return "Examination [topics=" + topics + ", options=" + options + ", answer=" + answer + ", analysis="
				+ analysis + ", examSite=" + examSite + ", Source=" + Source + ", errorProne=" + errorProne + ", items="
				+ items + "]";
	}
}
